package com.wly.mina.filter;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class GPBProtocolFactory implements ProtocolCodecFactory
{
	private static final GPBEncoder ENCODER_INSTANCE = new GPBEncoder(); 
	private static final GPBDecoder DECODER_INSTANCE = new GPBDecoder(); 
	@Override
	public ProtocolDecoder getDecoder(IoSession arg0) throws Exception
	{
		// TODO Auto-generated method stub
		return DECODER_INSTANCE;
	}

	@Override
	public ProtocolEncoder getEncoder(IoSession arg0) throws Exception
	{
		// TODO Auto-generated method stub
		return ENCODER_INSTANCE;
	}

}
